<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<%@ include file="/WEB-INF/views/include/header.jsp"%>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-cmsAttribute-add">

			<div class="form-group">	
				<label class="col-sm-3 control-label">属性编码：</label>
				<div class="col-sm-8">
					<input id="attrCode" name="attrCode" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">属性名称：</label>
				<div class="col-sm-8">
					<input id="attrName" name="attrName" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">图片高度：</label>
				<div class="col-sm-8">
					<input id="imageHeight" name="imageHeight" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">图片宽度：</label>
				<div class="col-sm-8">
					<input id="imageWidth" name="imageWidth" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">排序：</label>
				<div class="col-sm-8">
					<input id="attrSeq" name="attrSeq" class="form-control" type="text">
				</div>
			</div>
		</form>
	</div>
    <%@ include file="/WEB-INF/views/include/footer.jsp"%>
    <script type="text/javascript">
		var prefix = ctx + "cms/cmsAttribute"
		$("#form-cmsAttribute-add").validate({
			rules:{
                attrName:{
					required:true,
				},
                attrCode:{
                    required:true,
                },

			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-cmsAttribute-add').serialize());
	        }
	    }
	</script>
</body>
</html>
